/****** Object:  Stored Procedure dbo.spr_UpdateExDBHotelsByPK  ******/

 use [TourIS]
 GO

 if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[spr_UpdateExDBHotelsByPK]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
 drop procedure [dbo].[spr_UpdateExDBHotelsByPK]
 GO

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS OFF
 GO

 CREATE  PROCEDURE [dbo].[spr_UpdateExDBHotelsByPK]
 (
	@orig_compid int,
	@compid int,
	@orig_hotelid int,
	@hotelid int,
	@hotelname varchar(50),
	@isactive bit,
	@isaprtment bit,
	@isroom bit,
	@issuite bit,
	@star int
 )

 AS

 BEGIN
	SET NOCOUNT ON
	DECLARE @Err int

	UPDATE [Hotels]
	SET
		[CompId] = @compid,
		[HotelId] = @hotelid,
		[HotelName] = @hotelname,
		[IsActive] = @isactive,
		[IsAprtment] = @isaprtment,
		[IsRoom] = @isroom,
		[IsSuite] = @issuite,
		[Star] = @star

	WHERE
	[CompId] = @orig_compid
	AND [HotelId] = @orig_hotelid


	SET @Err = @@Error
	RETURN @Err
 END

 SET QUOTED_IDENTIFIER OFF
 GO
 SET ANSI_NULLS ON
 GO

